#ifndef DICTIONARY_H
#define	DICTIONARY_H

#include <vector>
#include <string>

struct Entry
{
    std::string value_;
    std::vector<int> pages_;

    Entry(std::string value) : value_(value)
    {
    }
    
    void increasePage(int page);
};

class Dictionary
{
public:
    Dictionary(const char* dictionaryPath);
    std::vector<Entry>& getEntries();
    const std::vector<Entry>& getEntries() const;
    void addEntry(std::string entry, int page);

private:
    Entry* containsEntry(std::string word);
    
    std::vector<Entry> entries_;
};

std::ostream& operator<<(std::ostream& output, const Entry& entry);

std::ostream& operator<<(std::ostream& output, const Dictionary& dictionary);

#endif	/* DICTIONARY_H */

